package modele;

/**
 *
 * @author p1101304
 */
public class Position implements Comparable{
    public int x, y;
    
    Position(int x, int y){
        this.x=x;
        this.y=y;
    }

    @Override
    public int compareTo(Object o) {
        Position o1 = (Position) o;
        if(x == o1.x && y == o1.y)
            return 0;
        else if(x > o1.x && y > o1.y)
            return -1;
        else
            return 1;
            
            
    }
    
    @Override
    public boolean equals(Object o){
        Position p = (Position) o;
        if(x == p.x && y == p.y)
            return true;
        else
            return false;
    }
}
